The present invention relates to post-processing of decompressed digital images and, more particularly, to a method of directional, selective filtering of decompressed images.
Transform coding is a common method for compressing digital images. For examples, transform coding is featured in the JPEG (ISO 10918) standard related to still images and the MPEG-2 (ISO/IEC 13818) standard related to motion video. Generally, transform coding involves subdividing an image into smaller blocks or groups of pixels, applying a “reversible transform” (such as the Discrete Cosine Transform (DCT)) to the pixels of the blocks, quantizing the frequency coefficients produced by the transform, and coding of the results. While transform coding can achieve a high compression ratio, information in the original image is discarded in the compression-decompression process degrading the decompressed image, especially in video sequences with considerable motion.
Decompressed transform coded images may include visible artifacts of the compression-decompression process. A common artifact is the “blocking” effect, also known as “grid noise.” The blocking effect is the result of the process of approximating each of the frequency coefficients produced by the transform as one of a limited number of permitted values during the quantization step. The encoder selects a quantization parameter establishing the difference between successive permitted values and assigns each frequency coefficient to the nearest permitted value. As a result of the “rounding off” during quantization, adjacent pixels may have different quantized values even though their colors were nearly the same in the original image causing individual blocks to be visible in the decompressed image. This is a particular problem in areas of uniform color and along color boundaries. In addition, the decompressed image may exhibit “staircase noise,” a term which is descriptive of an appearance of an edge in the image. The staircase appearance is the result of enhancement of the blocking effect for blocks lying across an edge in an image. A third artifact of interest in decompressed images is the so called “ringing artifact” that produces jagged or fuzzy lines in the vicinity of sharp edges. All of these artifacts can be annoying to viewers of the image. Accordingly, images are processed after decompression (post-processed) to reduce or eliminate some or all of these artifacts.
Several methods have been used to remove or reduce annoying artifacts in decompressed images. Some methods attempt to recover the original image from the decompressed image and knowledge of the smoothness properties of the image before compression. Generally, these methods are complex and often iterative limiting their usefulness in real time video applications.
Filtering may also be applied to the image pixels to reduce artifacts of the compression process. For example, filtering may be applied to pixel segments of rows or columns normal to the block boundaries to smooth the color or grayscale transition across the boundary, thereby reducing the blocking effect. Classification of the block's neighborhood and filtering based on the classification can be part of the filtering process. While filtering pixel segments normal to block boundaries is useful in addressing the blocking effect, it does not necessarily address ringing artifacts. Further, edges may be filtered and some portions of diagonal edges may be filtered repeatedly, adversely impacting the sharpness of the decompressed image.
What is desired, therefore, is a computationally conservative method of post-processing a decompressed image that effectively addresses both blocking and ringing artifacts but preserves the sharpness of edges in the image.